<div class="title">
    用户登录
</div>
<div id="flash">
    <% [:error, :warning, :notice].each do |key| -%>
    <%= content_tag :div, flash[key], :id=> key, :class => key if flash[key] %>
    <% end -%>
</div>
<div class="center">
    <% form_for :user, :url => { :action => 'authenticate' } do |f| -%>
    <table>
        <tr>
            <td class="label">
                <%= f.label :username, "用户名：" %>
            </td>
            <td>
                <%= f.text_field :username, :size => 20 %>
            </td>
        </tr>
        <tr>
            <td class="label">
                <%= f.label :password, "密码：" %>
            </td>
            <td>
                <%= f.password_field :password, :size => 20 %>
            </td>
        </tr>
        <tr>
            <td class="label">
            </td>
            <td>
                <%= submit_tag '立即登录' %>
            </td>
        </tr>
    </table>
    <% end %>
</div>
